import React from 'react';

export default class Index extends React.Component {
  onClick = (e) => {
    const { onClick } = this.props;
    onClick && onClick(e);
  }

  render() {
    const { type, className = ''} = this.props;
    return (
      <svg aria-hidden="true" className={`icon ${className}`} onClick={this.onClick}>
        <use xlinkHref={`#icon${type}`} />
      </svg>
    );
  }
}
